<template>
  <div>
    <el-container>

      <el-container>
        <el-aside width="200px">
          <el-row class="tac">
            <el-col >
              <el-menu
                class="el-menu-vertical-demo"
                background-color="#545c64"
                text-color="#fff"
                @open="handleOpen"
                @close="handleClose"
                @select="handleSelect"
                active-text-color="#ffd04b">
                <el-menu-item index="m-1"><router-link to="/ContentA">选项1</router-link></el-menu-item>
                    <el-menu-item index="m-2">选项2</el-menu-item>
                    <el-menu-item index="m-3">选项3</el-menu-item>
                    <el-menu-item index="m-4">选项4</el-menu-item>
              </el-menu>
            </el-col>
          </el-row>

        </el-aside>
        <el-container>
          <el-main><router-view/></el-main>
        </el-container>
      </el-container>
    </el-container>


  </div>
</template>

<script>
  export default {
    name:"layout",
    data: () => ({
      show: true
    }),
    methods: {
      handleOpen(key, keyPath) {
        console.log("handleOpen",key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log("handleClose", key, keyPath);
      },
      handleSelect(key, keyPath) {
        console.log("handleSelect", key, keyPath);
      }
    }
  }
</script>

<style>
  .el-header, .el-footer {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
  }

  .el-aside {
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
    line-height: 200px;
  }

  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
    line-height: 160px;
  }

  body > .el-container {
    margin-bottom: 40px;
  }

  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }

  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }
</style>
